<?php

namespace App\Http\Controllers;

use InfyOm\Generator\Utils\ResponseUtil;
use Response;


class AppBaseController extends Controller
{
    public function sendResponse($result = [], $message = 'success')
    {
        return $this->outputJSON(0, 'ok', $result);
//        return Response::json(ResponseUtil::makeResponse($message, $result));
    }

    public function sendError($error, $code = 500)
    {
//        return Response::json(ResponseUtil::makeError($error), $code);
        return $this->outputJSON($code, $error);
    }
}
